<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__PUBLIC__/static/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />

</head>

<body class="gray-bg  top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content animated fadeInUp">
            <div class="row">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/atcenav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>{$current['title']} <small>数据时间：{$month|date='Y年m月',###}</small> </h5>
                            <div class="ibox-tools">
                                <a href="javascript:;" id="datepicker" style="color:black;">
                                    <i class="fa fa-calendar"></i>
                                    <input type="text" class="date" id="dateMonth"  value="{$month|date='Y-m',###}" readonly>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <form action="" method="get">
                                    <div class="col-sm-2 m-b-xs">
                                        <select class="form-control input-s-sm inline" name="uid">
                                            <option value="">所有成员</option>
                                            <volist name="members" id="v">
                                                <option value="{$v.uid}" <if condition="$_GET['uid'] eq $v['uid']"> selected </if> >
                                                    <if condition="$v['name']"> {$v.name}<else/> {$v.user}</if>
                                                </option>
                                            </volist>
                                        </select>
                                    </div>
                                    <div class="col-sm-2 m-b-xs">
                                        <select class="form-control input-s-sm inline" name="rid">
                                            <option value="0">所有类型</option>
                                            {$reports}
                                        </select>
                                    </div>
                                    <div class="col-sm-8">

                                            <div class="input-group">
                                                <input type="text" placeholder="内容检索" class="input-sm form-control" name="keyword" value="{$_GET['keyword']}">
                                                <span class="input-group-btn">
                                                <button type="submit" class="btn btn-sm btn-primary">搜索</button> </span>
                                            </div>

                                    </div>
                                </form>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped">
                                    <thead>
                                    <tr>
                                        <th> 序 号 </th>
                                        <th> 姓 名</th>
                                        <th> 日 期 </th>
                                        <th> 时 间 </th>
                                        <th> 类 型 - 项 目 </th>
                                        <th> 时 长</th>
                                        <th>相关说明</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <volist name="list" id="vo" empty="系统君还未找到数据！">
                                        <tr>
                                            <td>{$i}</td>
                                            <td>{$vo.name}</td>
                                            <td>{$vo.date|date='Y-m-d',###}</td>
                                            <td>{$vo.start|date='H:i',###}--{$vo.end|date='H:i',###}</td>
                                            <td>{$vo.rid|getRptFname} - {$vo.rid|getRptName}</td>
                                            <td><?php echo timediff($vo['start'],$vo['end']);?></td>
                                            <td class="look" data-toggle="modal" data-target="#myModal5" style="width: 150px;overflow: hidden;height: 30px;display: block;cursor: pointer;">{$vo.content|mb_substr=0,60,'utf-8'}</td>
                                        </tr>
                                    </volist>
                                    </tbody>
                                </table>
                            </div>
                            {$page}
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--大模态框-->
        <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                        <h4 class="modal-title">相关说明</h4>
                        <small class="font-bold">
                    </div>
                    <div class="modal-body">
                        <p id="model-content" style="font-size: 15px;"></p>
                    </div>

                    <div class="modal-footer">
                        <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="__PUBLIC__/static/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script>
    $(document).ready(function() {
        $(".dataTables-example").dataTable();
        //日期控件
        $("#datepicker .date").datepicker({format: 'yyyy-mm',minViewMode:1,keyboardNavigation:!1,forceParse:!1,autoclose:!0,todayHighlight:!0});
        //日期选择查询
        $("#dateMonth").on('change',function(){
            var month = $('#dateMonth').val();
            window.location.href="{:U('Attence/works')}?month="+month;
        })
        //显示更多相关说明
        $(".look").click(function(){
            var htmlStr = $(this).html();
            $('#model-content').html(htmlStr);
        })

    });
</script>


</body>

</html>